package org.linuxgears.BouncingBall.painter;

import java.awt.*;

/**
 * Created by IntelliJ IDEA.
 * User: grim
 * Date: 9 ��� 2010
 * Time: 0:22:22
 * To change this template use File | Settings | File Templates.
 */
public class SelectedBallPainter extends SimpleBallPainter {
    public SelectedBallPainter(Color color, int radius, Point position) {
        super(color, radius, position);
    }

    @Override
    public void paint(Graphics g) {
        super.paint(g);    //To change body of overridden methods use File | Settings | File Templates.
        g.setColor(Color.pink);

        // Another line style: a 2 pixel-wide dot-dashed line
        Stroke thindashed = new BasicStroke(4.0f, // line width
                /* cap style */BasicStroke.CAP_BUTT,
                /* join style, miter limit */BasicStroke.JOIN_BEVEL, 1.0f,
                /* the dash pattern */new float[]{8.0f, 3.0f, 2.0f, 3.0f},
                /* the dash phase */0.0f); /* on 8, off 3, on 2, off 3 */

        Graphics2D g2 = (Graphics2D)g;
        g2.setStroke(thindashed);  

        g.drawOval(this.getPosition().x - 3, this.getPosition().y - 3 , this.getSize() + 6, this.getSize() + 6);
    }
}
